//
// Created by Semir on 2020/6/6.
//

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int getSumFromLeftToRight(int left, int right) {
    return (left + right) * (right - left + 1) / 2;
}

vector<vector<int>> FindContinuousSequence(int sum) {
    vector<vector<int>> res;
    int left = 1;
    int right = 1;
    while (left * 2 <= sum) {
        int nowSum = getSumFromLeftToRight(left, right);
        while (nowSum < sum) {
            right++;
            nowSum = getSumFromLeftToRight(left, right);
        }
        if (nowSum > sum) {
            left++;
        } else {
            vector<int> newVec(right - left + 1);
            for (int i = left; i <= right; i++) {
                newVec[i - left] = i;
            }
            res.emplace_back(newVec);
            left++;
        }
    }
    return res;
}

int main() {
    vector<vector<int>> res = FindContinuousSequence(12);
    cout << res.size() << endl;
    return 0;
}